home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
src
/
swtools
/
trubasic
/
rolldemos
/
CMDLIST
next >
Wrap
Text File
|
1994-08-02
|
10KB
|
275 lines
Command List for UNIX version of True BASIC
-------------------------------------------
Updated for version 1.5:
abs(n) absolute value of n
acos(n) cosine of n
call add_postscript(s$) add the string s$ to PostScript otuput
angle(x,y) angle at point x,y
asin(n) arcsin of n
ask #n: ACCESS a$ ask file access (read/write)
ask background c ask background color index
ask color c ask foreground color index
ask color mix (c) r,g,b ask rgb color mix for color c
ask cursor v,h ask current cursor position
ask #1: DATUM a$ ask type of next item in file (num,str)
ask directory a$ ask current directory
ask #1: ERASABLE b$ ask if file is erasable
ask #1: FILESIZE n ask file size in bytes
ask #1: FILETYPE s$ ask file type (text, record, byte)
ask free memory n ask free memory in bytes
ask margin n ask margin
ask max color c ask maximum color index
ask max cursor v,h ask maximum cursor position
ask mode s$ ask mode (graphics, text, rgb...)
ask #1: NAME s$ ask file name
ask #1: ORGANIZATION s$ ask organization (text, record, byte)
ask pixels px,py ask number of pixels in window
ask #1: POINTER a$ ask file pointer (begin,middle,end)
ask #1: RECORD n ask record number
ask #1: RECSIZE n ask record size
ask #1: RECTYPE s$ ask record type
ask screen x1,x2,y1,y2 ask screen coordinates
ask #1: SETTER s$ ask setter
ask text justify i$,j$ ask text justification (left,center)
ask window x1,x2,y1,y2 ask window transformation
ask zonewidth n ask zonewidth (tabs)
ask #1: ZONEWIDTH n ask zonewidth for file
atn(n) arctangent of n
call backbuffer(1) turn on (1) or off (0) back buffer
begin_postscript(fname$,picax1,picax2,picay1,picay2)
send PS output to fname$ on pica window
box area x1,x2,y1,y2 box area with current color
box circle x1,x2,y1,y2 draw circle
box clear x1,x2,y1,y2 clear area
box ellipse x1,x2,y1,y2 draw ellipse
box keep x1,x2,y1,y2 in a$ keep area in image string
box lines x1,x2,y1,y2 draw lines
box show s$ at x,y show image at point x,y
break break program execution
case "n" case for case select
cause error n, s$ cause error number n with message s$
ceil(n) round n up
chain "!cc -o pgm pgm.c -lc",return chain to shell or other program
chr$(k) convert ascii code to char
clear clear current window
close #1 close channel
set mode "cmap" enter colormap mode (vs RGB)
con a mat array a=1
continue continue after error
cos(n) cosine of n
cosh(n) hyperbolic cosine of n
cot(n) cotangent
cpos(a$,b$,n) first occurrence of b$ in a$ from pos n
cposr(a$,b$,n) first b$ in a$ backwards from pos n
csc(n) cosecant
data 1 data statment
date$ date function
date date (numeric format)
debug on turn debugging on
declare def f$ declare a function
declare function f$ declare a function
declare numeric declare a numeric variable
declare public a declare a public variable
declare string s$ declare a string variable
declare sub sname declare a subroutine
deg degrees
det determinant of a matrix
call diagnostics(1) turn on (1) or off (0) diagnsotic msgs
dim a(1,1) dimension an array
divide divide function
do do loop
dot(a,b) dot product of two arrays
set mode "doublebuffer" turn on double buffering
draw polygon draw a picture
sub drawmode(m$) set the logical drawmode
set mode "dynamic" use read-write colors (vs shared)
else if-then-else-end if
elseif if-then-elseif-end if
end end of program
end def end of function
end function end of function
end handler end of handler
end if end of if
end module end of module
end picture end of picture
call end_ postscript(n) end PostScript output
end select end select
end sub end subroutine
end when end when
eps n epsilon of n
erase erase a file
exit exit
exit def exit function
exit do exit do loop
exit for exit for next
exit function exit function
exit handler exit error handler
exit picture exit picture
exit sub exit subroutine
exline$ error line number
exline error line string
exp exponent of number
external external variable
extext$ error text
extype error type
flood x,y flood contiguous region
call fill_circle(x1,x2,y1,y2) draw filled circle
for for next
fp(n) fractional part of n
call frontbuffer(1) turn front buffer on (1) or off (0)
get key k block for key
get mouse x,y,state get mouse position and state
get point x,y get mouse click
sub get_mouse(button$,x,y,state) get position and state of mouse
gosub sname gosub
goto n goto
call gshade(pts,clrs) Gourard shading function
idn identity of matrix
if if then
image image string for print using
input n input
inputfocus(n) mouse focus in window (1) or out (0)
int(n) integer
inv a invert matrix
ip greatest unsigned integer
lbound(n) lower bound
lcase$(n$) lower case
len(n$) length
library "module.tru" include
line input n$ input a line
local n local variable
lock #1: n lock a record or range of bytes
log n log
log10 n log base 10
log2 n log base 2
loop do loop
ltrim$(n$) trim at beginning
mat a read in a matrix
mat input a input a matrix
mat line input a$ input a matrix of lines
mat plot a plot a matrix
mat print a$ print a matrix
mat read a read a matrix
mat redim a redimension a matrix
max(a,b) max
mat write a write a matrix
maxlen(s$) maximum length
maxnum largest number
maxsize(a$) maximum size
min(a,b) minimum
mod(o,d) modulus
module foo module
ncpos(a$,b$,n) first b$ char not in a$ from pos n
ncposr(a$,b$,n) first b$ char not in a$ back from pos n
next i for next
nul$(a) zero arrray
num$(a) IEEE 8 byte format
num(a$) return number
on gosub gosub
open #1: name "foo" open file channel
open #1: screen x1,x2,y1,y2 open screen channel
option angle angle (vs degrees)
ord(n$) ordinal position in ASCII set
option arithmetic option arithmetic (vs decimal)
option base option base
option collate option collate
option nolet make let statement optional
option typo flag mismatched variable names
packb(a$,bstart,blen,value) pack value into a$ for byte positions
pause secs pause
pi pi (3.14159...)
picture foo picture
call pipe(op$,f$,nb,io$,fn) pipe i/o
play sound$ play sound
plot x,y plot point
plot area x1,x2,y1,y2 plot area
plot line x1,x2,y1,y2 plot lines
plot points ar plot points
plot text, at x,y: s$ plot text
call popup(menu$) popup menu
pos(a$,b$,n) first b$ in a$ from char n
posr(a$,b$,n) first b$ in a$ backwards from char n
print "hello world" print
private varname private variable
program pname with (parm$) program with parameter
public varname public variable
rad(x) number of radians in x degrees
randomize randomize seed
read n read data
rem comment comment (also !)
remainder remainder
call readcpixel(px,py,r,g,b) read RGB values for pixel
n=readpixel(px,py) return colormap index for pixel
n=readsource(1) readsource back buffer (0), front (1)
b=refresh(1) true when refresh event has occurred
repeat$(s$,n) repeat s$ n times
reset #1 reset channel pointer
restore restore data
retry retry error
return return
set mode "rgb" set mode RGB (vs cmap)
rnd random number 0 to 1
round(n,p) round n to p places
rtrim$(s$) trim rear
run pgm.tru run program
sec(n) secant
select case s$ select case
set #1: begin set channel to beginning
call setfont(f$) set font to family name f$
call setfontsize(n) set font size
call setfontstyle(s$) set font style (weight,slant)
set background clr set background color
set color clr set foreground color
set color mix (clr) r,g,b set RGB color mix
set cursor y,x set cursor position
set directory s$ set directory
set margin n set margin
set mode "graphics" set graphics mode, open window
set name #1: "foo" set name for file
set pointer #1: end set channel pointer to end
set record #1: n set current record
set recsize #1: n set record size
set text justify i$,j$ set text justification
set window x1,x2,y1,y2 set window transformation
set zonewidth n set zonewidth
sgn(n) sign of n
share var shared variable
sin(n) sine
sinh(n) hyperbolic sine
size(a) size of array a
sound f,d sound note with frequency and duration
sqr(n) square root
stop stop program
str$(n) convert number to string
sub foo subroutine
call swapbuffers(1) swap fornt and back buffers
tab(n) tab n spaces
tan(n) tangent
tanh(n) hyperbolic tangent
time$ time string
time time numeric format
trace on turn trace mode on
trim$(s$) trim front and back
trn(n) transpose 2d numeric array
tru pgm.tru -o pgm produce executable from basic pgm
truncate(s$) truncate string
ubound(a$,i) upperbound of dimension i
ucase$(s$) convert to uppercase
unlock #1: n unlock a record or range of bytes
unpackb(s$,1,8) unpack bytes from string
use use error handler
using$ print using format string
val(s$) return numerical value
when when error in
sub winfo(m$,v$) get/set window attributes
window #1 switch to a window
write #1: n write to a byte file
call tw_wset_current(wid,x1,x2,y1,y2) set window position (0-1)
call tw_wset_minmax(wid,x1,x2,y1,y2) set minmax for window (0-1)
call tw_wset_size(px,py) set window size in pixels
call tw_wset_title(wid,t$) set window title
zer(a) zero out array
zonewidth n set zonewidth